package de.tabuma.lib.contentmanagement;

import java.util.*;

/**
 *
 * @author alefen
 */
public class constants {
    public static final int CREATE = 1;
    public static final String CREATE1 = "CREATE1";
    public static final int UPDATE = 2;
    public static final String UPDATE1 = "UPDATE1";
    public static final int REMOVE = 3;
    public static final String REMOVE1 = "REMOVE1";
    public static final int LIST = 4;

    public static final String OBJECT_LIST = "objectList";
    public static final String OBJECT = "object";

    public static final int TYPE_STRING = 1;
    public static final int TYPE_PASSWORD = 2;
    public static final int TYPE_TEXTAREA = 3;
    public static final int TYPE_INTEGER = 4;
    public static final int TYPE_DOUBLE = 5;
    public static final int TYPE_LIST = 6;
    public static final int TYPE_BOOLEAN = 7;
    public static final int TYPE_LIST_STRING = 8;
    public static final String id = "Id";

    public static final String CANCEL = "cancel";

    public static final String MESSAGE_INFO = "messageInfo";
    public static final String MESSAGE_ERROR = "messageErro";

    public static final String MESSAGE_ERROR_GENERAL = "message.error.general";
    public static final String MESSAGE_ERROR_CREATE = "message.error.create";
    public static final String MESSAGE_ERROR_UPDATE = "message.error.update";
    public static final String MESSAGE_ERROR_REMOVE = "message.error.remove";
    public static final String MESSAGE_INFO_CREATE = "message.info.create";
    public static final String MESSAGE_INFO_UPDATE = "message.info.update";
    public static final String MESSAGE_INFO_REMOVE = "message.info.remove";

    public static final String MESSAGE_VALIDATION_MANDATORY = "message.validation.mandatoryfield";
    public static final String MESSAGE_VALIDATION_INTEGER = "message.validation.integer";
    public static final String MESSAGE_VALIDATION_DOUBLE = "message.validation.double";
    public static final String ERROR_FIELD = "errorField";

    public static String getValueFromProperties(String key, Locale local) {
        return java.util.ResourceBundle.getBundle("de.tabuma.lib.contentmanagement.language", local).getString(key);
    }
}
